/* 
* Copyright (C) 2011-2018 ShenZhen iBOXSaaS Information Technology Co.,Ltd. 
* 
* All right reserved. 
* 
* This software is the confidential and proprietary 
* information of iBOXSaaS Company of China. 
* ("Confidential Information"). You shall not disclose 
* such Confidential Information and shall use it only 
* in accordance with the terms of the contract agreement 
* you entered into with iBOXSaaS inc. 
* 
*/

 package org.iboxpay.open.common.exception;

import org.iboxpay.open.common.constants.ResultEnums;

/**
 * 
 * BusinessException.java
 * @author xuxiao
 * @date 2018/06/25
 */
public class BusinessException extends RuntimeException {

    /**
     *
     */
    private static final long serialVersionUID = -1864989852262319217L;

    private ResultEnums resultEnums;

    public BusinessException(ResultEnums resultEnums) {
        super(String.format("%s-%s", resultEnums.getCode(), resultEnums.getDesc()));
        this.resultEnums = resultEnums;
    }

    public ResultEnums getResultEnums() {
        return resultEnums;
    }

    public void setResultEnums(ResultEnums resultEnums) {
        this.resultEnums = resultEnums;
    }
    
}
